home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Interactive 7
/
PC World Interactive 7.iso
/
program
/
asprog.EXE
/
SHOWC.ASM
< prev
next >
Wrap
Assembly Source File
|
1996-07-05
|
4KB
|
162 lines
.Model tiny
.Code
.startup
Prog proc Far
push ds ;Save DS
xor ax,ax
push ax
lea dx,Offset Cder ;Coder
mov ah,09h
int 21h
lea dx,Offset Dmsg ;File Name Message
mov ah,09h
int 21h
lea dx,Offset DName ;Get File Name
mov ah,0ah
mov si,dx
mov byte ptr [si],0dh
int 21h
inc si
mov bl,[si]
sub bh,bh
inc si
mov byte ptr[si+bx],0
lea dx,offset Dname+2 ;Is there file
mov ah,4eh
int 21h
jnc goon0
lea dx,Offset HMsg
mov ah,09h
int 21h
jmp qex
goon0:
mov ax,3d02h ;Open File
int 21h
Jnc goon ;If Error
lea dx,Offset H1Msg
mov ah,09h
int 21h
jmp qex
goon:
mov bx, ax ;File Handle->bx
xor cx, cx
xor dx, dx
mov ax, 4202h ;Move File Pointer End of File
int 21h
push ax
xor dx, dx
mov ax, 4200h
int 21h ;Move File Pointer Begin of File
pop cx ;File Size
push bx ;Save File Handle
mov ah,4ah ;Set Memory
mov bx,0ffffh
int 21h
push cx ;Save File Size
mov bx,cx ;Set Neded Memory
mov cl,4
shr bx,cl
shl bx,1
push bx
inc bx
mov ah,4ah
int 21h
mov ah,48h
pop bx
int 21h
pop cx
pop bx
mov ds,ax ;Memory address
xor dx,dx
mov ah,3fh ;Read File
int 21h
mov ah,3eh ;Close File
int 21h
mov ah,0Fh ;Get Screen Mode
int 10h
push ax
mov ax,0013h ;Screen Mode=13
int 10h
mov ax,0A000h
mov es,ax
mov si,80h
xor di,di
Resal:
cmp byte ptr ds:[si],192
jae Norle
movsb
Jmp DevamC
NoRle:
xor dx,dx
mov dl,byte ptr ds:[si]
sub dl,192
inc si
Tekrar:
movsb
dec si
dec dl
cmp dl,0
ja tekrar
inc si
DevamC:
cmp di,0fa00h
jbe ResAl
push si
Palet:
shr word Ptr ds:[si],1
inc si
cmp si,cx
jbe Palet
mov ax,1012h
xor bx,bx
mov cx,256
push ds
pop es
pop dx
int 10h
mov ah,08h
int 21h
pop ax
xor ah,ah ;Restore Screen Mode
int 10h
qex:
mov ah,4ch
int 21h
prog endp
Palett dw ?
DName db ?
Dmsg db 'Dosya adì.....: ','$'
Cder db 'Programmed by Halil TA₧',13,10
db 'Eylül CAT BBS - 90-(212)258-7472',13,10
db '────────────────────────────────',13,10,'$'
Hmsg db 13,10,'Dosya bulunamadì...','$'
H1msg db 13,10,'Dosya açìlamìyor...','$'
end